﻿<%@ Page Language="C#" MasterPageFile="~/YUIAspNet.Master" AutoEventWireup="true" CodeBehind="ButtonTypeSplit.aspx.cs" Inherits="YUIAspNetDemo.Button.ButtonTypeSplit" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>YUIAsp.Net Controls : LiveDemo : Button : Split Button</title>
    <style type="text/css">
        .customCssItem {background-color:Gray;}
        .customCssItem a {color:Lime}
    </style>
    
    <script type="text/javascript">
        function tell(sender, args) {
            alert(args.item.text + " was clicked!");
            args.cancel = true;
        }        
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>Split button</h1>
    
    <p>YUIAsp.Net Button with type split is a mixture between the Button control and the Menu control, offering a rich and flexible control.</p>
    
    <p>Using split button, you have a primary option, and a list of secondary options.</p>
            
    <p>
    <yui:Button ID="btnSplit" EnableAnimation="true" Text="<i>Here is a </i> <b>split button</b>" ButtonType="Split" runat="server">
        <ButtonMenu runat="server">
            <Effect Duration="0.2" Effect="Fade" />
            <Items>
                <yui:MenuItem Text="Custom script" Value="0" OnClientClick="tell" />
                <yui:MenuItem Text="Option 1 with PB" Value="1" AutoPostback="true" />
                <yui:MenuItem Text="Option 2" Value="2" />
                <yui:MenuItem Text="Checked item" Value="3" Checked="true" />
                <yui:MenuItem Text="Selected item" Value="4" Selected="true" />
                <yui:MenuItem Text="Disabled item" Value="5" Enabled="false" />
                <yui:MenuItem Text="YUIAsp.Net" Target="_blank" NavigateUrl="http://YUIAsp.Net" />
                <yui:MenuItem Text="Custom css class" Value="6" CssClass="customCssItem" />
            </Items>
        </ButtonMenu>
    </yui:Button>
    <br />
    <asp:Label ID="lblPost" runat="server"></asp:Label>
    </p>
</asp:Content>

